/**
 * @Package: 	com.group.pojo 
 * @author: 	Liu  
 * @date: 		Jan 1, 2019 4:07:24 PM 
 */
package com.group.pojo;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @ClassName:	 Test.java
 * @Description: 该类的功能描述
 * @author:		 Liu
 * @date: 		 Jan 1, 2019 4:07:24 PM 
 */
public class Test {

	/**
	 * @Function: 	 Test.java
	 * @Description: 该函数的功能描述
	 * @param:		   参数
	 * @return:		   返回结果描述
	 * @author: 	 Liu
	 * @date:		 Jan 1, 2019 4:07:24 PM 
	 */
	public static void main(String[] args) {
			int flag = 0;//0为任务已过期
			//获取当前时间
			Date date = new Date();
			DateFormat dateF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			String currentTime = dateF.format(date);
			
			try{
				Date workend = dateF.parse("2019-01-01 19:55:46");
				Date currenttime = dateF.parse(currentTime);
				if(workend.getTime() > currenttime.getTime()){
					flag = 1;
				}else if(workend.getTime() < currenttime.getTime()){
					flag = 0;
				}
			}catch(Exception e){
				e.printStackTrace();
			}
			System.out.println(flag);
	}

}
